package com.fw.mediasession.media.bean;

import com.google.gson.annotations.SerializedName;

/**
 * mediaScanner扫描的音乐文件
 * 歌曲ID：MediaStore.Audio.Media._ID
 * Int id = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media._ID));
 * 播放音频就是通过这个ID来索引
 * <p>
 * 歌曲的名称 ：MediaStore.Audio.Media.TITLE
 * public String tilte = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.TITLE));
 * <p>
 * 歌曲的专辑名：MediaStore.Audio.Media.ALBUM
 * public String album = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ALBUM));
 * <p>
 * <p>
 * 歌曲的歌手名： MediaStore.Audio.Media.ARTIST
 * public String artist = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.ARTIST));
 * <p>
 * 歌曲文件的路径 ：MediaStore.Audio.Media.DATA
 * public String url = cursor.getString(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DATA));
 * 路径转为URI用 Uri.fromFile(new File(url));
 * <p>
 * 歌曲的总播放时长 ：MediaStore.Audio.Media.DURATION
 * Int duration = cursor.getInt(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.DURATION));
 * <p>
 * 歌曲文件的大小 ：MediaStore.Audio.Media.SIZE
 * Int size = cursor.getLong(cursor.getColumnIndexOrThrow(MediaStore.Audio.Media.SIZE));
 */

public class Music extends BaseBean {




    @SerializedName("url")
    public String url;

    @SerializedName("size")
    public String size;
    @SerializedName("displayName")
    public String displayName;

    @Override
    public String toString() {
        return "Music{" +
                "ID='" + ID + '\'' +
                ", title='" + title + '\'' +
                ", filePath='" + filePath + '\'' +
                ", mimeType='" + mimeType + '\'' +
                ", album='" + album + '\'' +
                ", artist='" + artist + '\'' +
                ", url='" + url + '\'' +
                ", duration='" + duration + '\'' +
                ", size='" + size + '\'' +
                ", displayName='" + displayName + '\'' +
                '}';
    }
}
